<template>
  <page-table
    rowKey="userGroupRoleId"
    ref="userGroupRolePageTable"
    query-type="list"
    :query-api="userGroupRole_queryListApi"
    :delete-api="userGroupRole_deletesApi"
    :query-param="qureyParam"
    :columns="columns"
  >
    <template #customIsUpdate="{text}">
      <a-tag v-if="text" color="#87d068">可以更新</a-tag>
      <a-tag v-else color="#f50">不能更新</a-tag>
    </template>
  </page-table>
</template>
<script>
import {
  userGroupRole_queryListApi,
  userGroupRole_deletesApi
} from "@/api/org/userGroupRole";
const columns = [
  { title: "角色名称", dataIndex: "roleName" },
  { title: "角色描述", dataIndex: "roleDescription" },

  {
    title: "能否修改",
    dataIndex: "isUpdate",
    scopedSlots: { customRender: "customIsUpdate" }
  },
  { title: "创建时间", dataIndex: "createTime" }
];
export default {
  props: {
    userId: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      columns,
      userGroupRole_queryListApi,
      userGroupRole_deletesApi,
      qureyParam: {
        userId: this.userId
      }
    };
  }
};
</script>